{include file="public/nheader"}
<div class="layui-fluid layui-bg-white">
    <form action="{:url()}" class="layui-form layui-form-fixed">
        <div class="layui-form-item">
            <label class="layui-form-label">
                <font color="red">* </font>商品类别
            </label>
            <div class="layui-input-block">
                <select name="cateid" lay-verify="required">
                    {foreach $class as $v}
                    <option value="{$v.id}" {if !empty($row.cateid) && $row.cateid==$v.id}selected{/if}>
                        {$v.name}
                    </option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <font color="red">* </font>商品链接
            </label>
            <div class="layui-input-block">
                <input type="text" id="url" name="url" required="" lay-verify="required" autocomplete="off"
                    class="layui-input" value="" placeholder="">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <font color="red">* </font>商品价格
            </label>
            <div class="layui-input-block">
                <input type="number" id="price" name="price" required="" lay-verify="required" autocomplete="off"
                    class="layui-input" value="{$row.price|default=''}" placeholder="请输入价格">
            </div>
        </div>
        <div class="layui-footer layui-form-item layui-center ">
            <input type="hidden" value="{$row['id']|default='0'}" name="id" />
            <button class="layui-btn" lay-filter="submitIframe" type="button" lay-submit>提交</button>
            <button class="layui-btn layui-btn-primary" type="button" sa-event="closeDialog">取消</button>
        </div>
    </form>
</div>
{include file="public/nfooter"}